/*
 *  $Id: DivinePresence.cs 1051 2010-05-18 22:10:41Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Light.Spells {
    public class DivinePresence: SelfEnchantmentCard {
        public DivinePresence(): base("001_l_s_divine_presence") {
            Level = CompleteLevel.ReadyForTest;
            Element = ElementType.Light;
            Value = 100;
            AddManaCost(ElementType.Light, 2);
        }

        protected override EnchantmentAffect CreateEnchantment() {
            return new DivinePresenceAffect();
        }

        public static int GetCoefficient(Player player) {
            int coeff = 1;
            foreach (Affect affect in player.Summary.GetEnchantments())
                if (affect is DivinePresenceAffect)
                    coeff *= 2;
            return coeff;
        }

        private class DivinePresenceAffect: EnchantmentAffect<DivinePresence> {
            public DivinePresenceAffect() {
                Add(new TimeAffect(4));
            }
        }
    }
}
